import React, { useState, useEffect } from 'react'
import { useLocation } from 'dva'

export default function usePathName() {
  const [pathName, setPathName] = useState()
  const localtion = useLocation()
  useEffect(() => {
    setPathName(localtion.pathname)
  }, [])

  return pathName
}

